package com.xiaoxin.xinlikesystem.constant;


/**
 * @version 1.0
 * @Author 武小新
 * @Date 2025/5/12 21:47
 * @注释
 */
public interface ThumbConstant {

    /**
     * 点赞存储前缀
     */
    String USER_THUMB_KEY_PREFIX = "blog:thumb:";


    /**
     * 点赞分布式锁
     */
    String LOCK_DO_THUMB_KEY_PREFIX = "lock:blog:doThumb:";


    /**
     * 取消点赞分布式锁
     */
    String LOCK_UNDO_THUMB_KEY_PREFIX = "lock:blog:undoThumb:";


    /**
     * 缓存空值
     */
    Long EMPTY_THUMB_PLACEHOLDER = -1L;

    /**
     * 缓存空值时间(非热点数据)
     */
    Integer THUMB_TIME = 5;

    /**
     * 缓存空值时间(热点数据)
     */
    Integer THUMB_HOT_TIME = 30 * 24 * 60;

    /**
     * 点赞阈值
     */
    Long HOT_BLOG_LIKE_THRESHOLD = 100L;


    /**
     * 点赞记录键
     */
    String TEMP_THUMB_KEY_PREFIX = "thumb:temp:%s";
}
